package com.ycg.vue.Entity.Dto;

import lombok.*;

/**
 * @Description
 * @Author jink
 * @Date 2024/5/22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PageResultDto {

    private Integer page;
    private Integer pageSize;
    private Object form;

    public Integer getPage() {
        if (this.page == null || this.page <= 0) return 0;
        else return (this.page - 1) * this.pageSize;
    }

    public Integer getPageSize() {
        if (this.pageSize == null || this.pageSize <= 0) return 10;
        else return this.pageSize;
    }
}
